package com.mondo.financialwallet.presentation.model;

import java.io.Serializable;

public class FinancialOrderList implements Serializable {

    private int type;

    private String amount;

    private String name;

    private String date;

    private String orderNumber;

    public FinancialOrderList(int type, String amount, String name, String date, String orderNumber) {
        this.type = type;
        this.amount = amount;
        this.name = name;
        this.date = date;
        this.orderNumber = orderNumber;
    }

    public String getTypeString(){
        // ("0待收款","1已超时","2已取消","3服务中","4待清算","5清算驳回","6已清算","7待提现","8提现驳回","9已提现")
        switch (type){
            case 0:
                return "待收款";
            case 1:
                return "已超时";
            case 2:
                return "已取消";
            case 3:
                return "服务中";
            case 4:
                return "待清算";
            case 5:
                return "清算驳回";
            case 6:
                return "已清算";
            case 7:
                return "待提现";
            case 8:
                return "提现驳回";
                default:return "已提现";
        }
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public int getType() {
        return type;
    }

    public String getAmount() {
        return type == 6 ? "+$" + amount : "-$" + amount;
    }

    public String getName() {
        return name;
    }

    public String getDate() {
        return date;
    }
}
